<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<title>ECSHOP 管理中心</title>
<base href="__ROOT__/admin/"/>
<meta name="robots" content="noindex, nofollow">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="styles/general.css" rel="stylesheet" type="text/css">
<link href="styles/main.css" rel="stylesheet" type="text/css">
<!-- <script type="text/javascript" src="js/transport.js"></script><script type="text/javascript" src="js/common.js"></script> -->
<style>
  .panel-icloud .panel-right iframe {
    height: 300px;
    margin-top: 15px;
  }
  .panel-hint{
    top: 0%;
  }
</style>

<script src="__ROOT__/admin/js/jquery-2.1.4.min.js"></script>
<script>
     $(document).on("click","#box2 a,#sou",function(){

    event.preventDefault();
    url = $(this).attr("href");
    var order_sn = $(".order_sn").val();
    var consignee = $(".consignee").val();
   
    $.ajax({

      url:url,
      type:"get",
      data:{order_sn:order_sn,consignee:consignee},
      dataType:"json",
      success:function(res){
        // console.log(res)
        $(".box1").empty();
        var str1 = "";
        var str2 = "";
        var str3 = "";
        var str4 = "";
        $.each(res.data,function(k,v){

             if(v.order_status==0)
             str1 = "<?php echo '未确定' ?>";
              else
             str1 = "<?php echo '已确定' ?>";

           if(v.pay_status==0)
             str2 = "<?php echo '未付款' ?>";
              else
             str2 = "<?php echo '已付款' ?>";

           if(v.shipping_status==0)
             str3 = "<?php echo '未发货' ?>";
              else
             str3 = "<?php echo '已发货' ?>";



            var tr = $("<tr></tr>");
            tr.append("<td style='background-color: rgb(255, 255, 255);' valign='top' nowrap='nowrap'><input name='checkboxes' value='2016051183359' type='checkbox'>"+v.order_sn+"</td>");
            tr.append("<td style='background-color: rgb(255, 255, 255);'>"+v.addtime+"</td>");
            tr.append("<td style='background-color: rgb(255, 255, 255);' valign='top' align='left'><a href='mailto:ecshop@ecshop.com'>"+v.consignee+"</td>");
            tr.append("<td style='background-color: rgb(255, 255, 255);' valign='top' nowrap='nowrap' align='right'>￥"+v.order_amount+"元</td>");
            tr.append("<td style='background-color: rgb(255, 255, 255);' valign='top' nowrap='nowrap' align='right'>￥"+v.order_amount+"元</td>");

            tr.append("<td style='background-color: rgb(255, 255, 255);' valign='top' nowrap='nowrap' align='center'>"+str1+str2+str3+"</td>");

            tr.append("<td style='background-color: rgb(255, 255, 255);' valign='top' nowrap='nowrap' align='center'><a href='{:url('Order/ordershow')}?order_id="+v.order_id+"'>查看</a></td>");

            // tr.append("<td style='background-color: rgb(255, 255, 255);' align='center'><a href='{:url('Attr/attribute')}' title='属性列表'>属性列表</a><a href='' title='编辑'>编辑</a>|<a href='{:url('Type/del')}?cat_id="+v.cat_id+"' onclick='listTable.remove(1, '删除商品类型将会清除该类型下的所有属性。\n您确定要删除选定的商品类型吗？')' title='移除'>移除</a></td>");
            $(".box1").append(tr);
        })
        $("#box2").html(res.pagess);
      }
    })
  })
</script>



</head>
<body>
<!--云起激活系统面板-->
<div class="panel-hint panel-icloud" id="panelCloud">
  <div class="panel-cross"><span onclick="btnCancel(this)">Ｘ</span></div>
  <div class="panel-title">
    <span class="tit">您需要激活系统</span>
    <p>用云起账号激活您的系统，享受物流查询，天工收银，手机短信等更多应用和服务</p>
  </div>
  <div class="panel-left">
    <span>没有云起账号吗？</span>
    <p>点击下列按钮一步完成注册激活！</p>
    <a href="https://account.shopex.cn/reg?refer=yunqi_ecshop" target="_blank" class="btn btn-yellow">免费注册云起账号</a>
  </div>
  <div class="panel-right">
    <h5 class="logo">云起</h5>
    <p>正在激活中</p>
    <iframe src="order.html" id="CFrame" frameborder="0"></iframe>
    <div class="cloud-passw">
      <a target="_blank" href="https://account.shopex.cn/forget?">忘记密码？</a>
    </div>
  </div>
</div>
<!--云起激活系统面板-->
<!--遮罩-->
<div class="mask-black" id="CMask"></div>
<!--遮罩-->
<h1>
    
    <span class="action-span1"><a href="http://localhost/dayi/ecshop/ecshop/admin/index.php?act=main">ECSHOP 管理中心</a> </span><span id="search_id" class="action-span1"></span>
  <div style="clear:both"></div>
</h1>
<!-- <script type="text/javascript" src="order_data/utils.js"></script><script type="text/javascript" src="order_data/listtable.js"></script> -->
<!--<script type="text/javascript" src="js/dialog.js"></script>-->
<!-- 订单搜索 -->
<link href="order_data/calendar.css" rel="stylesheet" type="text/css">
<div class="form-div">
  <!-- <form action="javascript:searchOrder()" name="searchForm"> -->
    <!-- <img src="images/icon_search.gif" width="26" height="22" border="0" alt="SEARCH" /> -->
    订单号<input class="order_sn" size="15" type="text">
    <!-- 订单状态    <select name="status" id="status">
      <option value="-1">请选择...</option>
      <option value="0" selected="selected">待确认</option><option value="100">待付款</option><option value="101">待发货</option><option value="102">已完成</option><option value="1">付款中</option><option value="2">取消</option><option value="3">无效</option><option value="4">退货</option><option value="6">部分发货</option>    </select> -->

    <input value="搜索" id="sou" type="button" class="btn">
   <!--  <span class="btn-search cl-link" style="padding-left: 20px" onclick="detailSearch()">高级搜索</span> -->
    <!--ERP link-->

            <!--<a href="" class="btn-ERP">进入<i class="cl-red">ERP</i>处理订单</a>
      <a href="" class="btn-ERP">授权绑定<i class="cl-red">ERP</i></a>
      <a href="" class="btn-ERP">了解详情开通<i class="cl-red">ERP</i></a>-->



    <!--ERP link-->
    <!--<a href="order.php?act=list&composite_status=0">待确认</a>-->
    <!--<a href="order.php?act=list&composite_status=100">待付款</a>-->
    <!--<a href="order.php?act=list&composite_status=101">待发货</a>-->

  <!-- </form> -->
</div>

<!-- 订单列表 -->
<form method="post" action="order.php?act=operate" name="listForm" onsubmit="return check()">
  <div class="list-div" id="listDiv">

<table cellspacing="1" cellpadding="3">
  <tbody><tr>
    <th>
      
      <a href="javascript:listTable.sort('order_sn',%20'DESC');">订单号</a>    </th>
    <th><a href="javascript:listTable.sort('add_time',%20'DESC');">下单时间</a><img src="images/sort_desc.png"></th>
    <th><a href="javascript:listTable.sort('consignee',%20'DESC');" title="点击对列表排序">收货人</a></th>
    <th><a href="javascript:listTable.sort('total_fee',%20'DESC');">总金额</a></th>
    <th><a href="javascript:listTable.sort('order_amount',%20'DESC');">应付金额</a></th>
    <th>订单状态</th>
    <th>操作</th>
  </tr><tr>
    </tr>

<tbody class="box1">
    <?php foreach ($data['data'] as $key => $value): ?>
          
          <tr>
            <td style="background-color: rgb(255, 255, 255);" valign="top" nowrap="nowrap"><a href="{:url('order/ordershow')}?order_id=<?php echo $value['order_id'] ?>" id="order_0"><?php echo $value['order_sn'] ?></a></td>
            <td style="background-color: rgb(255, 255, 255);"><?php echo $value['addtime']?></td>
            <td style="background-color: rgb(255, 255, 255);" valign="top" align="left"><a href="mailto:ecshop@ecshop.com"><?php echo $value['consignee'] ?></td>
            <td style="background-color: rgb(255, 255, 255);" valign="top" nowrap="nowrap" align="right">￥<?php echo $value['order_amount'] ?>元</td>
            <td style="background-color: rgb(255, 255, 255);" valign="top" nowrap="nowrap" align="right">￥<?php echo $value['order_amount'] ?>元</td>
            <td style="background-color: rgb(255, 255, 255);" valign="top" nowrap="nowrap" align="center">
              
                   <?php

                      if ($value['order_status']==0){
                          echo "未确定".",";
                      }else{
                          echo "已确定".",";
                      }

                      if ($value['pay_status']==0){
                            echo "未付款".",";
                      }else{
                            echo "已付款".",";
                      }

                      if ($value['shipping_status']==0){   
                          echo "未发货".",";
                      }else{
                           echo "已发货".",";
                      }

                  ?>

            </td>
            <td style="background-color: rgb(255, 255, 255);" valign="top" nowrap="nowrap" align="center">
             <a href="{:url('Order/ordershow')}?order_id=<?php echo $value['order_id'] ?>">查看</a>
            </td>
          </tr>

    <?php endforeach ?>
  </tbody>
   
   
     </tbody></table>


<!-- 分页 -->
<table id="page-table" cellspacing="0">
  <tbody><tr>

    <td nowrap="true" align="right">
    <!-- $Id: page.htm 14216 2008-03-10 02:27:21Z testyang $ -->
<div id="turn-page">
  <!-- <span id="pageCurrent">1</span> / <span id="totalPages">1</span>
  页，每页 <input size="3" id="pageSize" value="15" onkeypress="return listTable.changePageSize(event)" type="text">
  条记录，总共 <span id="totalRecords">4</span>
  条记录
  <span id="page-link">
    <a href="javascript:listTable.gotoPageFirst()">第一页</a>
    <a href="javascript:listTable.gotoPagePrev()">上一页</a>
    <a href="javascript:listTable.gotoPageNext()">下一页</a>
    <a href="javascript:listTable.gotoPageLast()">最末页</a>
    <select id="gotoPage" onchange="listTable.gotoPage(this.value)">
      <option value="1" selected="selected">1</option>    </select>
  </span> -->
  <span id="box2">
  {$data['pagess']}
  </span>
</div>
    </td>
  </tr>
</tbody></table>

<!--两个温馨提示-->
<!-- start upload template -->
  </div>
</form>






</body></html>